import pygame

def slice_sprites(width, height, image_name):
    images = []
    master_image = pygame.image.load(image_name).convert()
    master_image.set_colorkey(master_image.get_at((0,0)))
    master_width, master_height = master_image.get_size()
    for i in range(master_width / width):
        images.append(master_image.subsurface(i * width, 0, width, height))        
    return images

class GameObject(pygame.sprite.Sprite):
    SCREEN_WIDTH = -1
    SCREEN_HEIGHT = -1

    def __init__(self, screen_width, screen_height):
        pygame.sprite.Sprite.__init__(self)
        if GameObject.SCREEN_WIDTH < 0 and GameObject.SCREEN_HEIGHT < 0:
            GameObject.SCREEN_WIDTH = screen_width
            GameObject.SCREEN_HEIGHT = screen_height


